<?php

namespace App\Listeners;

use App\Events\OrderDeliveredEvent;
use App\Notifications\ShipmentNotification;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class OrderDeliveredListener
{
    public function handle(OrderDeliveredEvent $event)
    {
        $event->order->user->notify(new ShipmentNotification('您的订单已发货', $event->order));
    }
}
